const mock = require('mockjs');

const data = mock.mock({
    "category|6": [{
        'id|+1': 1,
        'title': '@cname',
    }],
    "commodity|200": [{
        'id':'@id',
        'name':'@cname',
        'price': '@integer(min= 1, max=10, precision=2)',
        'oldPrice': '@integer(min= 1, max=10, precision=2)',
        'quantity':'@integer(min= 1, max=30)',
        'categoryId':'@integer(min= 1, max=6)',
        'colour': [{'name':'红色','color':'#FF0000'}, {'name':'黄色','color':'#F0F000'}],
        'size': ['S','L','M','XL','XXL','XXXL'],
        'synthesis': '@integer(min= 1, max=10, precision=2)',
        'newProduct': '@integer(min= 1, max=10, precision=2)',
        'salesVolume': '@integer(min= 1, max=10, precision=2)',
        'image': '@image("120x120", "#4A7BF7")'
    }]
})

module.exports = () => data